package com.software.graduationproject.modules.food.entity;

import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.v2coding.validate.CreateGroup;
import com.v2coding.validate.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.v2coding.mybatis.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.*;
import java.util.Date;
import java.math.BigDecimal;

/**
 * FoodType : 食品表
 * ---------------------------------------------------------------------------------------------------------------------
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("food_type")
@ApiModel(value = "FoodType", description = "食品表")
public class FoodType extends BaseModel<FoodType> {

    @TableField(value ="type_name")
    @ExcelProperty(value = "类别名称")
    @ApiModelProperty(value = "类别名称")
    @NotEmpty(groups = {CreateGroup.class, UpdateGroup.class}, message = "类别名称不能为空")
    @Size(groups = {CreateGroup.class, UpdateGroup.class}, max = 255, message = "类别名称长度不能超过255")
    private String typeName;

    @TableField(value ="marketers_id")
    @ExcelProperty(value = "商家Id")
    @ApiModelProperty(value = "商家Id")
    @NotNull(groups = {CreateGroup.class, UpdateGroup.class}, message = "商家Id不能为空")
    private Long marketersId;

}
